﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using GeckoPhotos.Models;
using System.Data.Objects;

namespace GeckoPhotos.Repository
{

    public class EFHomeRepository : EFRepositoryBase<int, Message>, IHomeRepository
    {

        public EFHomeRepository()
            : this(new DatabaseEntities())
        {
        }

        public EFHomeRepository(DatabaseEntities context)
            : base(context.Messages)
        {
        }

        IEnumerable<Message> IHomeRepository.GetHomeMessages()
        {
            return (
                from o in _objectSet
                select o
                ).ToArray();
        }

    }

}